home *** CD-ROM | disk | FTP | other *** search
- package java.io;
-
- class SHAOutputStream extends OutputStream {
- private int pctx;
- private byte[] hash;
-
- public SHAOutputStream() {
- this.reset();
- }
-
- public void write(int var1) {
- byte[] var2 = new byte[]{(byte)var1};
- this.write(var2, 0, 1);
- }
-
- public synchronized native void write(byte[] var1, int var2, int var3);
-
- public synchronized native void reset();
-
- public synchronized byte[] getHash() {
- this.hash = new byte[20];
- this.finish();
- return this.hash;
- }
-
- private native void finish();
- }
-